<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{margin:0;padding: 0}
        li{
            float: left;
            list-style: none;
            line-height: 50px;
        }
        ul{
            background: pink;

            /* 子元素float父元素的高度会坍塌
            如何让父元素重新获取高度 overflow:hidden;
             */
             overflow: hidden;
        }
    </style>
</head>
<body>
    <!-- float就是为了让元素去并排显示 -->
    <ul>
        <li>html</li>
        <li>css</li>
        <li>Javascript</li>
    </ul>
</body>
</html>